project(ax_base)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)


if(WIN32)
    add_definitions(-DLIBAX_BUILD)
    add_definitions(-D_WIN32_WINNT=0x0601)
    ADD_DEFINITIONS(-DWIN32)
    ADD_DEFINITIONS(-DWINDOWS)
else()
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}     -std=c99   -g")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g")
    if(APPLE)
        ADD_DEFINITIONS(-DAPPLE)
    elseif(ANDROID)
        ADD_DEFINITIONS(-DANDROID)
    else()
        ADD_DEFINITIONS(-DLINUX)
    endif()
endif()

if(MINGW)
    add_definitions(-D_POSIX)
    add_definitions(-DMINGW)
endif()
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin)

OPTION(ENABLE_STATIC_LIBS "Enable building of static libraries" OFF)
OPTION(DISABLE_C          "Disable C   libraries"               OFF)
OPTION(DISABLE_CPP        "Disable CPP libraries"               OFF)

enable_testing()

add_subdirectory(src)

#if(NOT WIN32)
    add_subdirectory(test)
#endif()
